# coding=utf-8
from django.contrib import admin
from django.conf import settings
from apps.news.models import News

class NewsAdmin(admin.ModelAdmin):
    list_display = ('news_title_en', 'news_title_zh', 'news_datetime', 'news_cover', 'news_status')  #   去掉id，
    list_filter = ('news_datetime', 'news_status')
    list_max_show_all = 1000000     #   如果新闻放不下，改这个数字
    list_per_page = 10
    search_fields = ['news_title_en', 'news_title_zh']

    class Media:
        js = [settings.MEDIA_URL+'plugins/tiny_mce/tiny_mce_src.js', 
              #settings.MEDIA_URL+'plugins/tiny_mce/tiny_mce_config.js',
              settings.MEDIA_URL+'plugins/filebrowser/js/TinyMCEAdmin.js'
             ]

admin.site.register(News, NewsAdmin)
